﻿using System;
using System.Collections.Generic;
using System.Linq;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository
{
    public interface IExcessTimeSeriesRepository
    {
       
        
        T Get<T>(Func<IQueryable<ExcessTimeSerie>, T> f);

        /// <summary>
        /// Get list of excess timeseries for given parameters
        /// </summary>
        /// <returns>ExcessReturns with different benchmarks</returns>
        List<T> GetList<T>(Func<IQueryable<ExcessTimeSerie>, IEnumerable<T>> f);
        
        /// <summary>
        /// Insert new items to excess timeseries table
        /// </summary>
        /// <param name="items">items to add</param>
        void Merge(IEnumerable<ExcessTimeSerie> items);

        DateTime? GetMaxDate(int securityId, int benchmarkId);


    }
}